package aqua.smile.p6spy.core;

import com.p6spy.engine.spy.appender.MessageFormattingStrategy;


public class P6SpyLogger2 implements MessageFormattingStrategy {

    @Override
    public String formatMessage(int connectionId, String now, long elapsed, String category, String prepared, String sql, String url) {
        String results = "";
        if (!"".equals(sql.trim())) {
            results = "| 执行时间：" + now + " | 消耗时间： " + elapsed + "ms | " + " 连接ID： " + connectionId + "\n " + sql.replaceAll("[\\s]+", " ") + ";";
        }
        return results;
    }
}
